import fetch from '@/utils/fetch'

export function apiAddContract(contractDto) {
  return fetch({
    url: '/api/v1/warranty/contract',
    method: 'post',
    data: contractDto
  })
}

export function apiGetContractList(listQuery) {
  return fetch({
    url: '/api/v1/warranty/contract/list',
    method: 'get',
    params: listQuery
  })
}

export function apiUpdContract(contractDto) {
  return fetch({
    url: '/api/v1/warranty/contract',
    method: 'put',
    data: contractDto
  })
}

export function apiDelContract(id) {
  return fetch({
    url: '/api/v1/warranty/contract',
    method: 'delete',
    params: id
  })
}

